MagicalCoder.install({
  /*左侧可拖拽的源*/
  dragItems:[
    {
      name:"学习定义组件",
      icon:"layui-icon layui-icon-face-smile",
      children:[
        {
          name:"我的远程按钮",
          icon:"ri-star-smile-line",
          html:"<mc-redirect-button v-model='remoteSelect'></mc-redirect-button>"
        }
      ]
    }
  ],
  /*自定义组件和属性*/
  components:[
    {"identifier":"mc-redirect-button",
      "properties":{"primary":0,"name":"链接按钮","treeExtraName":{"attr":[],"text":true},"dragInto":false,"duplicate":true,"duplicateAttr":[],"copy":true,"paste":false,"canDelete":true,"dblClickChange":{"type":"text"}},
      "attributes":[
        {"title":"属性","active":true,"content":[
          {"type":"text","clearAttr":true,"oneLine":true,"change":"text","title":"文本"},
          {type:"text"  ,clearAttr:true    ,oneLine:true        ,change:"attr"    ,title:'跳转地址'     ,attrName:'href'},
          {type:"select",clearAttr:true    ,oneLine:true        ,change:"attr"    ,title:'打开方式'     ,attrName:'target',options:[{"_blank":"新窗口","_self":"当前窗口","_parent":"父窗口","_top":"TOP窗口"}]},
          {"type":"select","clearAttr":true,"oneLine":true,"change":"attr","title":"尺寸","attrName":"size","options":[{"medium":"中等","small":"小","mini":"迷你"}]},
          {"type":"select","clearAttr":true,"oneLine":true,"change":"attr","title":"类型","attrName":"type","options":[{"primary":"默认","success":"成功","warning":"警告","danger":"危险","info":"信息","text":"文本"}]},
          {"type":"checkbox","clearAttr":true,"oneLine":true,"change":"attr","title":"状态","options":[{"n":"plain","t":"朴素","c":true,"u":false},{"n":"round","t":"圆角","c":true,"u":false},{"n":"circle","t":"圆型","c":true,"u":false},{"n":"disabled","t":"禁用","c":true,"u":false},{"n":":loading","t":"加载中","c":"true","u":""},{"n":":autofocus","t":"聚焦","c":"true","u":""}]},
          {"type":"text","clearAttr":true,"oneLine":true,"change":"attr","title":"图标","attrName":"icon","extendKey":"icon","extend":true},
          {"type":"select","clearAttr":true,"oneLine":true,"change":"attr","title":"原生类型","attrName":":native-type","options":[{"button":"普通按钮","submit":"提交","reset":"重置"}]}
        ]},
      ],
     }]
})
